package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.FinanceProductHotRankModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by DF on 5/23/2017
 */
public interface FinanceProductHotRankRepository extends JpaRepository<FinanceProductHotRankModel, Integer>, JpaSpecificationExecutor<FinanceProductHotRankModel> {
    @Query("select a from FinanceProductHotRankModel a where a.fiId = ?1 and a.permit = ?2")
    FinanceProductHotRankModel getMoByFiIdAndPermit(Integer fiId, String permit);
}
